package tmt.usercenter.web.repository;


import com.tmt.jpa.jpaservice.ITmtBaseRepo;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import tmt.usercenter.web.domain.TmtRole;
import tmt.usercenter.web.domain.TmtUser;
import tmt.usercenter.web.domain.TmtUserRole;

import java.util.List;

public interface ITmtUserRoleRepo extends ITmtBaseRepo<TmtUserRole, Long> {

    boolean existsByUserAndRole(TmtUser user, TmtRole role);

    List<TmtUserRole> findAllByUserIdAndRoleOriginSystemClientId(Long userId, String clientId);

    List<TmtUserRole> findAllByUserId(Long userId);
}
